﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ArrayList at = new ArrayList();
        at.Add(new Student
            {
                Name = "张三",
                age=21,
            });
        at.Add(new Student
            {
                Name = "李四",
                age = 22,
            });
        at.Add(new Student
            {
                Name = "王五",
                age = 23,
            });
        at.Add(new Student
            {
                Name = "赵六",
                age = 19,
            });
        var query = from Student s in at where s.age > 20 select s;
        foreach(Student stu in query)
        {
            Label1.Text += stu.Name + " " + stu.age.ToString() + "<br>";
        }
    }
}